import React from 'react';
import ReactDOM from 'react-dom';

import { BrowserRouter as Router, Route } from 'react-router-dom';

import Index from './pages/Index';
import UserInfo from './pages/UserInfo';
import NewDetail from './pages/NewDetail';
import Chat from './pages/Chat';

import registerServiceWorker from './registerServiceWorker';

class BaseRouter extends React.Component{
    render () {
        return (
            <Router>
                <div>
                    <Route path="/index" component={Index} />
                    <Route path="/user-info" component={UserInfo} />
                    <Route path="/news-detail" component={NewDetail} />
                    <Route path="/chat/:id" component={Chat} />
                </div>
            </Router>
        );
    }
}

ReactDOM.render(<BaseRouter />, document.getElementById('root'));
registerServiceWorker();
